package com.fy56.platform.goodsTracking.quartz;

import com.fy56.platform.goodsTracking.api.UploadApi;
import com.fy56.platform.goodsTracking.car.quartz.CarUpload;
import com.fy56.platform.goodsTracking.commons.DateUtil;
import com.fy56.platform.goodsTracking.commons.security.MD5;
import com.fy56.platform.goodsTracking.model.Jrpt;
import com.fy56.platform.goodsTracking.police.quartz.PoliceUpload;
import com.fy56.platform.goodsTracking.service.JrptService;
import com.fy56.platform.goodsTracking.web.UserToken;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class GoodsUpload {
    @Autowired
    private UploadApi uploadApi;
    @Autowired
    private JrptService jrptService;
    @Autowired
    private PoliceUpload policeUpload;
    @Autowired
    private CarUpload carUpload;

    static Logger log = Logger.getLogger(GoodsUpload.class);

    public void upload() {
         int iloop = 0;
         log.info("执行上传操作(" + DateUtil.Now() + ")");
        //查询所有需要上传的组织代码
            try {
                uploadApi.doUpload_Goods_Top("","");
            } catch (Exception e) {
                log.error("GoodsUpload upload:" + e.getMessage());
            }
        try {
            Thread.sleep(10000);//休息一会

        } catch (InterruptedException ire) {
        }


        //根据
        try {
            Thread.sleep(10000);//休息一会
        } catch (InterruptedException ire) {
        }
    }
}
